package com.ray.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ray.exception.ServiceException;
import com.ray.mapper.ShenHeMapper;

@Service
public class ShenHeService {
	
	@Autowired
	ShenHeMapper shenHeMapper;
	
	public String[] getButtomUser(String user,String xiangMu) throws ServiceException {
		String buttomUser=shenHeMapper.getButtomUser(user, xiangMu);
		if(null==buttomUser||"".equals(buttomUser)) {
			throw new ServiceException("没有"+xiangMu+"权限");
		}
		String [] str=buttomUser.split(",");
		return str;
	}

}
